import request from '@/utils/request'
import qs from 'qs'

// 会议列表
export function getMeetingsList(data) {
  return request({
    url: '/meeting/pageMeetingByParam',
    method: 'post',
    data
  })
}

// 所有会议列表
export function getAllMeetingsList(data) {
  return request({
    url: '/meeting/findAllMeeting',
    method: 'post',
    data
  })
}

// 会议详情
export function getMeetingShow(params) {
  return request({
    url: '/meeting/findMeetingByMeetingId',
    method: 'get',
    params
  })
}

// 新建线下会议
export function addOffMeeting(data) {
  return request({
    url: '/meeting/addOffMeeting',
    method: 'post',
    data
  })
}

// 新建线上会议
export function addOnlineMeeting(data) {
  return request({
    url: '/meeting/addOnlineMeeting',
    method: 'post',
    data
  })
}

// 新建会议
export function addMeeting(data) {
  const postData = qs.stringify(data)
  return request({
    url: '/meeting/addMeeting',
    method: 'post',
    data: postData
  })
}

// 编辑会议
export function editMeeting(data) {
  const postData = qs.stringify(data)
  return request({
    url: '/meeting/updateMeeting',
    method: 'post',
    data: postData
  })
}

// 删除会议
export function removeMeeting(params) {
  return request({
    url: '/meeting/deleteById',
    method: 'post',
    params
  })
}

// 参会类型列表
export function getJoinMeetingType(params) {
  return request({
    url: '/dic/findJoinMeetingType',
    method: 'get',
    params
  })
}

// 会议类型列表
export function getMeetingType(params) {
  return request({
    url: '/dic/findMeetingType',
    method: 'get',
    params
  })
}

// 会议状态列表
export function getMeetingStatus(params) {
  return request({
    url: '/dic/findMeetingStatus',
    method: 'get',
    params
  })
}

// 肿瘤类型列表
export function getTumorType(params) {
  return request({
    url: '/dic/findTumorType',
    method: 'get',
    params
  })
}

// 会议签到列表
export function getMeetingSignin(params) {
  return request({
    url: '/meeting/signIn/findList',
    method: 'post',
    params
  })
}

// 会议邀请列表
export function getMeetingInvites(params) {
  return request({
    url: '/meeting/invite/findMeetingInviteList',
    method: 'post',
    params
  })
}

// 会议邀请添加
export function addMeetingInvite(params) {
  return request({
    url: '/meeting/invite/addMeetingInvite',
    method: 'post',
    params
  })
}

// 会议邀请编辑
export function editMeetingInvite(params) {
  return request({
    url: '/meeting/invite/updateMeetingInvite',
    method: 'post',
    params
  })
}

// 会议邀请删除
export function removeMeetingInvite(params) {
  return request({
    url: '/meeting/invite/deleteMeetingInvite',
    method: 'get',
    params
  })
}

// 会议行程列表
export function getMeetingSchedule(params) {
  return request({
    url: '/meeting/journey/findList',
    method: 'get',
    params
  })
}

// 会议行程添加
export function addMeetingSchedule(params) {
  return request({
    url: '/meeting/journey/add',
    method: 'post',
    params
  })
}

// 会议行程编辑
export function editMeetingSchedule(params) {
  return request({
    url: '/meeting/journey/update',
    method: 'post',
    params
  })
}

// 会议行程详情
export function meetingScheduleShow(params) {
  return request({
    url: '/meeting/journey/findById',
    method: 'get',
    params
  })
}

// 会议行程推送
export function pushMeetingSchedule(params) {
  return request({
    url: '/meeting/journey/pushJourney',
    method: 'post',
    params
  })
}

// 会议行程导出
export function exportMeetingSchedule(params) {
  return request({
    url: '/meeting/journey/downloadJourney',
    method: 'get',
    params
  })
}

// 会议行程上传
export function uploadMeetingSchedule(params) {
  return request({
    url: '/meeting/journey/uploadJourney',
    method: 'post',
    params
  })
}

// 删除会议行程
export function removeMeetingSchedule(params) {
  return request({
    url: '/meeting/journey/delete',
    method: 'get',
    params
  })
}

// 会议上线提醒
export function tweetMeetingOnline(params) {
  return request({
    url: '/meeting/pushMeetingMessage',
    method: 'post',
    params
  })
}

// 会议开始提醒
export function tweetMeetingStart(params) {
  return request({
    url: '/meeting/pushLiveMeetingMessage',
    method: 'post',
    params
  })
}

// 会议开关
export function updateOpen(params) {
  return request({
    url: '/meeting/updateOpen',
    method: 'get',
    params
  })
}

// 会议igsk列表展示
export function updateShow(params) {
  return request({
    url: '/meeting/updateShow',
    method: 'get',
    params
  })
}

// 会议互动日程展示
export function updateScheduleShow(params) {
  return request({
    url: '/meeting/updateMeetingSchedule',
    method: 'get',
    params
  })
}

// 会议预约名单列表
export function meetingApplyList(params) {
  return request({
    url: '/meeting/invite/user/findByMeetingId',
    method: 'post',
    params
  })
}

// 发送会议调研
// export function pushMeetingSurvey(params) {
//   return request({
//     url: '/meeting/surveyMeeting',
//     method: 'post',
//     params
//   })
// }
